package boot.spring.service;

import java.util.List;
import java.util.Map;

import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.activiti.engine.runtime.ProcessInstance;

import boot.spring.po.LeaveApply;


public interface LeaveService {

    ProcessInstance startWorkflow(LeaveApply apply, String userId, Map<String, Object> variables);

    List<LeaveApply> getPageDeptTask(String userid, int firstRow, int rowCount);

    int getAllDeptTask(String userid);

    LeaveApply getleave(int id);

    List<LeaveApply> getPageHrTask(String username, int firstRow, int rowCount);

    int getallhrtask(String username);

    List<LeaveApply> getpageXJtask(String userid, int firstrow, int rowcount);

    int getallXJtask(String userid);

    List<LeaveApply> getpageupdateapplytask(String userid, int firstrow, int rowcount);

    int getallupdateapplytask(String userid);

    void completeReportBack(String taskId, String realStartTime, String realEndTime);

    void updateComplete(String taskId, LeaveApply leave, String reappply);

    List<String> getHighLightedFlows(ProcessDefinitionEntity deployedProcessDefinition, List<HistoricActivityInstance> historicActivityInstances);

    List<LeaveApply> getPageByApplyer(String username, int current, int rowCount);

    int getAllByApplyer(String username);
}